import React, { Component } from 'react'

import AraleQRCode from "arale-qrcode"
class Orcode extends Component {
    render() {
        return (
            <div>
                <div id="share_tools"></div>
            </div>
        )
    }

    componentDidMount() {
        let codeFigure = new AraleQRCode({
            "render": "svg", // 生成的类型 "svg" "table"
            "text": "https://img2.baidu.com/it/u=2619035048,309590331&fm=26&fmt=auto&gp=0.jpg",//需要生成二维码的链接
            "size": 120 //生成二维码大小
        });
        let share_tools = document.querySelector('#share_tools');
        share_tools.appendChild(codeFigure)
    }
}

export default Orcode
